<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="/js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/plugin/jQuery_ajax_document.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div>
			<!-- 下载方法-->
			<input type="button" onclick="download_word()" value="下载_word"></input>
		</div>
		<script>
			function download_word() {
				var option = {

					url: '/wordTmplate/word',
					type: 'GET',
					param: {},
					header: {
						"token": localStorage.getItem("token")
					}
				};
				$.ajaxDocument(null).then(function(data) {
					debugger;
					var blob = data;
					// 获取返回值
					var a = document.createElement('a');
					a.download = '打开那得看你.docx';
					a.href = window.URL.createObjectURL(blob);
					a.click();
				}, function() {

				});

			}
		</script>
	</body>

</html>